package com.biz.primus.app.rest;

import com.biz.primus.app.rest.config.Swagger2Configuration;
import com.biz.primus.ms.base.feign.PrimusSoaFeignErrorDecoder;
import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;

/**
 * @author yanweijin
 * @date 2017/11/3
 */
@SpringCloudApplication
@Import(Swagger2Configuration.class)
@EnableFeignClients
public class RestApplication {

	public static void main(String[] args) {
		new SpringApplication(RestApplication.class).run(args);
	}

	@Bean
	public PrimusSoaFeignErrorDecoder getErrorDecoder() {
		return new PrimusSoaFeignErrorDecoder();
	}
}
